const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin= require('html-webpack-plugin')
module.exports = {
  mode: "none",
  entry: "./src/index.js",
  output: {
    filename: "bundle.js",
    path: path.join(__dirname, "dist")
  },
  devtool: 'eval',
  devServer:{
    contentBase: ['./public'],
	// hot:true,
	hotOnly:true
  },
  module: {
    rules: [{
		test: /.css$/,
		use: [
			'style-loader',
			'css-loader'
		]
		},{
			test: /.jpg$/,
			use:[
			  'file-loader'
			]
		  }]
	},
  plugins:[
    new HtmlWebpackPlugin({
      title:'标题'
    }),
	new webpack.HotModuleReplacementPlugin()
  ]
}